package com.atguigu.cloud.exp;

import com.atguigu.cloud.resp.ReturnCodeEnum;
import lombok.Data;

@Data
public class MqyException extends RuntimeException{
    private String code;
    private String message;

    public MqyException(String code, String message) {
        super(message);
        this.code = code;
        this.message = message;
    }
    public MqyException(ReturnCodeEnum returnCodeEnum) {
        super(returnCodeEnum.getMessage ());
        this.code = returnCodeEnum.getMessage();
        this.message = returnCodeEnum.getMessage ();
    }
}
